<template>
  <van-swipe :autoplay="3000" :height="height">
    <van-swipe-item v-for="(image, index) in images" :key="index">
      <img v-lazy="image" />
    </van-swipe-item>
  </van-swipe>
</template>


<script>


export default {
  props: {
    images: {
      type: Array,
      default() {
        return [
          "https://img01.yzcdn.cn/vant/apple-1.jpg",
          "https://img01.yzcdn.cn/vant/apple-2.jpg"
        ];
      }
    },
    height: {
      type: Number,
      default: 200
    }
  }
};
</script>
<style scoped>
img {
  width: 100%;
  height: 100%;
}
</style>